<template>
  <div id="footer">
    <div>
      <template v-if="copyrightData.record_number">
        <p class="copyright">
          {{ copyrightData.copyright }} 备案号：
          <a href="//beian.miit.gov.cn" target="_blank">{{ copyrightData.record_number }}</a>
          <br />
          <span>{{ copyrightData.entity }}</span>
          <br />
          <span>{{ copyrightData.operate_entity }}</span>
        </p>
      </template>
      <template v-else>
        <p class="copyright">
          <span v-html="TEXT_COPYRIGHT"></span>
          <br />
          <span>贵州省农业信贷担保股份有限公司</span>
        </p>
      </template>
    </div>
  </div>
</template>

<script>
import { TEXT_COPYRIGHT } from '@/common/plugins/constant'
export default {
  components: {},
  props: {},
  data() {
    return {
      copyright: TEXT_COPYRIGHT,
      copyrightData: {},
      downloadUrl: this.$store.getters.appUrl,
    }
  },
  computed: {},
  watch: {},
  created() {
    // 502
    // this.$store.dispatch('getAppUrl')
    this.getData()
  },
  mounted() {},
  methods: {
    getData() {
      this.$api.getData('credit', 'copyright_info').then(res => {
        this.copyrightData = res?.data?.[0] ?? {}
      })
    },
  },
}
</script>

<style scoped lang="scss">
#footer {
  // border-top: 1px solid #f6f6f6;
  background-color: #fff;
  .copyright {
    margin: 20px 0;
    text-align: center;
    color: #999;
    font-size: 12px;
  }
}
</style>
